@extends('web.layouts.user')
@section('styles')
    <link rel="stylesheet" type="text/css" href="{{ asset('resources/web/css/products-detail.css')}}">
    <link rel="stylesheet" type="text/css" href="{{ asset('resources/web/css/ucenter.css')}}">
    <link rel="stylesheet" type="text/css" href="{{ asset('resources/web/css/base.css')}}">
    <link rel="stylesheet" type="text/css" href="{{ asset('resources/web/css/shenhe.css')}}">
    @endsection
    @section('content')
            <!--container-->
    <div class="container mt20 pt10 wrap clearfix" style="padding-top: 0px;margin-top: 0px;">
        <div class="bread-nav">
            <a href="#">我的账户</a><i>&gt;</i><a href="#">担保管理</a><i>&gt;</i><span>项目详情</span>
        </div>
        <div class="detail-main L">
            <!--project info-->
            <div class="project-box">
                <div class="project-title">
                    <h1>{{$project->projects_name}}</h1>
                    @if($project->new_projects)
                        <i class="tips">新手标</i>
                        @endif
                                <!-- <span class="R"><img src="{{asset('resources/web/images/detail_indem.gif')}}" height="16" width="14">100%本息保障</span> -->
                </div>
                <div class="project-info clearfix">
                    <dl class="item-col">
                        <dt>借款金额</dt>
                        <dd><em>{{$project->money}}</em><span>{{$project->money_cate}}</span></dd>
                    </dl>
                    <!--年化收益利率放到 data-rate里，jquery通过这个属性获取值来计算，具体算法根据实际情况改-->
                    <dl class="item-col" id="J_project_rate">
                        <dt>年化收益</dt>
                        <dd><em>{!! $project->auto_rate !!}</em></dd>
                    </dl>
                    <!--项目时间-->
                    <dl class="item-col" id="J_project_days">
                        <dt>项目期限</dt>
                        <dd><em>{{$project->finance_time_num}}</em><span>{{$project->finance_time_cate}}</span></dd>
                    </dl>
                </div>
                <ul class="project-info-prop clearfix">
                    <li class="col-md">起投金额：<em>{{$project->finance_rule_money}} 元</em></li>
                    <li class="col-sm">已投金额：<em>{{$project->had_money}} 元</em></li>
                    <li class="col-md">还需借款：<em>{{$project->need_money}} 元</em></li>
                    <li class="col-md">担保公司：<em>{{$project->collateral}}</em></li>
                    <li class="col-sm">担保方式：<em>抵押</em></li>
                    <li class="col-md">还款方式：<em>{{$project->repayment_name}}</em></li>
                </ul>
            </div>
            <!--project info /-->
            <!--project content-->
            <div class="project-content">
                <div class="project-content-menu">
                    <ul class="clearfix">
                        @if(@type_attr)
                            @foreach($type_attr as $key=>$item)
                                <li class="{{$key==0?'active':''}}">{{$item->attr_name}}</li>
                            @endforeach
                        @endif
                        <li>投资明细</li>
                    </ul>
                </div>
                <div class="project-content-box">
                    <!--项目信息-->
                    @if(@type_attr)
                        @foreach($type_attr as $key=>$item)
                            @if($item->cate)
                                <div class="papers {{$key==0?'':'hide'}}">
                                    @foreach(json_decode($item->content) as $img)
                                        <div class="img">
                                            <a href="javascript:;">
                                                <img src="{{$img}}">
                                                <!-- <span>组织机构代码</span> -->
                                            </a>
                                        </div>
                                    @endforeach
                                </div>
                            @else
                                <div class="project-description {{$key==0?'':'hide'}}">{!! $item->content !!}</div>
                                @endif
                                @endforeach
                                @endif
                                        <!--投资列表-->
                                <div class="invest-list hide">
                                    <ul class="invest-table">
                                        <li class="th">
                                            <span class="col-sm">序号</span>
                                            <span class="col-md">投资人</span>
                                            <span class="col-md">投资金额(元)</span>
                                            <span class="col-md">投资时间</span>
                                        </li>
                                        @forelse($invest as $key=>$item)
                                            <li class="td">
                                                <span class="col-sm">{{$key+1}}</span>
                                                <span class="col-md">{{$item->user_name}}</span>
                                                <span class="col-md">{{$item->invest_money}}</span>
                                                <span class="col-md">{{$item->invest_time}}</span>
                                            </li>
                                        @empty
                                            <li class="td">
                                                暂无投资记录
                                            </li>
                                        @endforelse
                                    </ul>
                                    <!-- <div class="com-page-bar">
                                      <ul>
                                        <li><a href="#">首页</a></li>
                                        <li><a href="#">上一页</a></li>
                                        <li class="active"><a href="#">1</a></li>
                                        <li><a href="#">2</a></li>
                                        <li><a href="#">3</a></li>
                                        <li><a href="#">4</a></li>
                                        <li><a href="#">5</a></li>
                                        <li><a href="#">…</a></li>
                                        <li><a href="#">24</a></li>
                                        <li><a href="#">下一页</a></li>
                                        <li><a href="#">尾页</a></li>
                                      </ul>
                                    </div> -->
                                </div>
                </div>
            </div>
            <!--project content /-->
        </div>
        <div class="shenhe-side R">
            <!--一级审核  status-start-->
            <div class="project-status-bar">
                <h2 class="title">项目状态</h2>
                <div class="content">
                    <div class="status-bar">满标审核(二级审核)</div>
                    <p class="mt20"><i class="icon-light"></i>该项目已生成借款合同 <a class="pl10" href="#">下载合同</a></p>
                    <p class="mt20">审核密码：<input type="password" class="txt" placeholder="请输入密码"></p>
                    <div class="text-center">
                        <input class="btn orange-bg" type="button" value="确认">
                        <input class="btn gray-bg" type="button" value="取消">
                    </div>
                </div>
            </div>
            <!-- 审核记录 -->
            <div class="project-shenhe-log mt20">
                <h2 class="title">审核记录</h2>
                <div class="content">
                    <dl>
                        <dt>一级审核记录</dt>
                        <dd>
                            <span>hbrzdb01</span>
                            <span class="pl10">2016-02-02 12:00:00</span>
                            <span class="pl10">完成审核</span>
                        </dd>
                    </dl>
                    <dl>
                        <dt>二级审核记录</dt>
                        <dd>暂无二级审核记录！</dd>
                    </dl>
                </div>
            </div>
        </div>
    </div>
    <!--container /-->
@endsection
@section('scripts')
    <script type="text/javascript" src="{{asset('resources/web/js/jquery.min.js')}}"></script>
    <script type="text/javascript" src="{{asset('resources/web/js/shenhe.js')}}"></script>
    <script type="text/javascript" src="{{asset('resources/web/plugins/datePicker/WdatePicker.js')}}"></script>
@endsection